﻿using UnityEngine;

//tips: Animation 使用的动画剪辑必须是Legacy
public class RawImageAni : MonoBehaviour
{
    public Animation ani;
    public AnimationClip[] clips;

    // Start is called before the first frame update
    void Start()
    {
        if (!ani.isPlaying)
        {
            AnimationClip clip = clips[0];
            // ani.AddClip(clip,clip.name);
            // ani.clip = clip;
            // ani.Play();
            
            ani.AddClip(clip,clip.name);
            ani.Play(clip.name);
        }
    }

}
